# -*- coding: utf-8 -*-
'''
Created on 2012-1-8

@author: dust
'''

from django import template

register = template.Library()

def start_with_yesno(value, arg):
    args = arg.split(',')
    prefix=args[0]
    yes=args[1]
    no=args[2]
    if value.startswith(prefix):
        return yes
    else:
        return no

register.filter("start_with_yesno",start_with_yesno)
        
